package com.kingbook.core.sql;

import java.util.Map;

/**
 * @Author: Bucky
 * @Date: 2019/1/2
 * @Version 1.0
 */
public class SqlPageContext extends SqlContext {

	private String countSql;

	private Map<String, ?> countParamMap;

	private int pageNo;

	private int pageSize;


	SqlPageContext(SqlContext sqlContext,SqlContext countSqlContext, int pageNo, int pageSize) {
		this.namespace = sqlContext.getNamespace();
		this.sqlId = sqlContext.getSqlId();
		this.sql = sqlContext.getSql();
		this.tableNames = sqlContext.getTableNames();
		this.paramMap = sqlContext.getParamMap();
		this.cacheConfig = sqlContext.getCacheConfig();
		this.countSql = countSqlContext.getSql();
		this.countParamMap = countSqlContext.getParamMap();
		this.pageNo = pageNo;
		this.pageSize = pageSize;
	}

	public String getCountSql() {
		return countSql;
	}

	public void setCountSql(String countSql) {
		this.countSql = countSql;
	}

	public Map<String, ?> getCountParamMap() {
		return countParamMap;
	}

	public void setCountParamMap(Map<String, ?> countParamMap) {
		this.countParamMap = countParamMap;
	}

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
}